# 唐诗三百首
import jieba 

with open('唐诗三百首.txt','r',encoding='UTF-8') as fr:
    txt = fr.read();
words = jieba.lcut(txt)
counts = {}
for word in words:
    counts[words] = counts.get(word,0)+1
items = list(counts.items())
